<div id="erpOrderLogisticPage" v-cloak>
<el-dialog
        :title="title"
        :visible.sync="erpOrderLogisticVisible"
        fullscreen
        >
    <!-- 物流发货 -->

        <div >
            <form class="form-group">
                <!-- 订单信息 start -->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        订单信息
                    </div>
                    <div class="panel-body">
                        <div class="row" style="line-height: 25px">
                            <div class="col-md-3 text-center">订单号：{{erpOrder.orderNo}}</div>
                            <div class="col-md-3 text-center">会员名：{{erpOrder.memberName}}</div>
                            <div class="col-md-3 text-center">订单金额：{{erpOrder.totalAmount}}</div>
                            <div class="col-md-3 text-center">送货方式：{{erpOrder.sendType==true?"自提":"非自提"}}</div>
                        </div>
                    </div>
                </div>
                <!-- 订单信息 end -->
                <!-- 发货信息 start -->
                <div class="panel panel-default">
                    <div class="panel-heading">
                        发货信息
                    </div>
                    <div class="panel-body" style="line-height: 35px">
                        <div class="col-md-3" style="line-height: 45px">
                            <div class="row">
                                <div class="col-md-3 text-right"><span style="color: red">*&nbsp;</span>发货类型：</div>
                                <div class="col-md-9">
                                    <el-radio-group v-model="erpLogistic.sendType" @change="sendTypeChange"
                                                    size="mini">
                                        <el-radio :label="1" border>发票</el-radio>
                                        <el-radio :label="2" border>样品</el-radio>
                                        <el-radio :label="3" border>订单</el-radio>
                                    </el-radio-group>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-3 text-right"><span style="color: red">*&nbsp;</span>物流类型：</div>
                                <div class="col-md-9">
                                    <el-radio-group v-model="erpLogistic.logiType" size="mini">
                                        <el-radio :label="1" border>呼叫快递</el-radio>
                                        <el-radio :label="2" border>添加物流</el-radio>
                                        <el-radio :label="3" border>自提</el-radio>
                                    </el-radio-group>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-3 text-right"><span style="color: red">*&nbsp;</span>物流方式：</div>
                                <div class="col-md-9">
                                    <el-select v-model="erpLogistic.logisticsId" @change="logiTypeChange" filterable
                                               placeholder="请选择" size="mini">
                                        <el-option v-for="item in logisticsTypeList" :key="item.logisticsId"
                                                   :label="item.logisticsName" :value="item.logisticsId"/>
                                    </el-select>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3" style="line-height: 45px">
                            <div class="row" v-show="showLogiNo">
                                <div class="col-md-3 text-right">配送单号：</div>
                                <div class="col-md-9">
                                    <input type="text" class="form-control input-sm" v-model="erpLogistic.logiNo"
                                           placeholder="配送单号"/>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-3 text-right">配送费用：</div>
                                <div class="col-md-9">
                                    <input type="number" class="form-control input-sm" v-model="erpLogistic.logiCost"
                                           placeholder="配送费用"/>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-3 text-right">配送备注：</div>
                                <div class="col-md-9 text-right">
                                    <input type="text" class="form-control input-sm" v-model="erpLogistic.logiRemark"
                                           placeholder="配送备注"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="row">
                                <div class="col-md-4 text-right"><span style="color: red">*&nbsp;</span>收货人：</div>
                                <div class="col-md-8 ">
                                    <input type="text" class="form-control input-sm" v-model="erpLogistic.toPeople"
                                           placeholder="收货人"/>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right"><span style="color: red">*&nbsp;</span>收货联系方式：</div>
                                <div class="col-md-8 ">
                                    <input type="text" class="form-control input-sm" v-model="erpLogistic.toPhone"
                                           placeholder="收货联系方式"/>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right"><span style="color: red">*&nbsp;</span>收货地区：</div>
                                <div class="col-md-8 ">
                                    <el-cascader placeholder="试试搜索：武汉市" size="small" filterable
                                                 style="width: 100%"
                                                 :options="area"
                                                 v-model="areaCascader"
                                                 @change="handleItemChange">

                                    </el-cascader>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">收货地址：</div>
                                <div class="col-md-8 ">
                                    <input type="text" class="form-control input-sm" v-model="erpLogistic.toAddress"
                                           placeholder="收货地址"/>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-3">
                            <div class="row">
                                <div class="col-md-4 text-right">发货人：</div>
                                <div class="col-md-8 ">
                                    <input type="text" class="form-control input-sm" v-model="erpLogistic.fromPeople"
                                           placeholder="发货人"/>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">联系方式：</div>
                                <div class="col-md-8 ">
                                    <input type="text" class="form-control input-sm" v-model="erpLogistic.fromPhone"
                                           placeholder="联系方式"/>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-4 text-right">发货地址：</div>
                                <div class="col-md-8 ">
                                    <input type="text" class="form-control input-sm" v-model="erpLogistic.fromAddress"
                                           placeholder="发货地址"/>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <!-- 发货信息 end -->
                <!-- 发货明细 start -->
                <div class="panel panel-default" v-show="showSendDetail">
                    <div class="panel-heading">
                        发货明细
                    </div>
                    <div class="panel-body">
                        <div class="form-group">
                            <el-table border stripe ref="multipleTable" :data="erpOrderItemData"
                                      @selection-change="orderItemSelectionChange"
                                      tooltip-effect="dark" size="mini">
                                <el-table-column type="selection" width="55"></el-table-column>
                                <el-table-column prop="eoItemId" label="商品ID" width="100"></el-table-column>
                                <el-table-column prop="name" label="商品名称" show-overflow-tooltip></el-table-column>
                                <el-table-column prop="addon" label="规格属性" show-overflow-tooltip></el-table-column>
                                <el-table-column prop="productId" label="商品编号" width="100"></el-table-column>
                                <el-table-column prop="unit" label="单位" width="60"></el-table-column>
                                <el-table-column prop="craftsNames" label="工艺" width="120"></el-table-column>
                                <el-table-column prop="nums" label="数量" width="100" fixed="right">
                                    <template slot-scope="scope">
                                        <el-input type="number" v-model="scope.row.nums" size="small" min="0"
                                                  :max="scope.row.nums" :value="scope.row.nums"></el-input>
                                    </template>
                                </el-table-column>
                            </el-table>
                        </div>
                    </div>
                </div>
                <!-- 发货明细 end -->
                <div class="grid-btn text-center">
                    <a class="btn btn-primary btn-sm" @click="saveLogistics">确认保存</a>
                    <a class="btn btn-warning btn-sm" @click="reback">返回</a>
                </div>
            </form>
        </div>


</el-dialog>
</div>
<script src="${request.contextPath}/statics/js/modules/order/erpOrderLogistic.js?_${.now?long}"></script>
